import Service from "@/service";

//通过userId获取菜单
export function getMenu(userId: string) {
    return Service.get('/api/menu/getMenu?userId=' + userId);
}

//通过参数获取菜单列表
export function getMenuDataByParams(params: any) {
    return Service.get('/api/menu/getDataByParams', {params});
}

//通过角色id查询菜单ids
export function getMenuIdsByRoleId(params: any) {
    return Service.get('/api/menu/getMenuIdsByRoleId', {params});
}

//保存菜单信息
export function saveMenu(params: any) {
    return Service.post('/api/menu/save', params)
}

//删除菜单
export function delMenu(menuId: string) {
    return Service.delete('/api/menu/del/' + menuId)
}
